//
//  SEGWebViewLayout.m
//  Pods-SEGWebView_Example
//
//  Created by 刘山 on 2020/3/8.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
static inline BOOL WK_IsIPhoneX(){
    //if (![UIScreen instancesRespondToSelector:@selector(currentMode)]) return NO;
    //if (CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size)) return YES;
    //if (CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size)) return YES;
    //if (CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size)) return YES;
    //return NO;

    if (@available(iOS 11.0, *)) {
        CGFloat height = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom;
        return (height > 0);
    } else {
        return NO;
    }
}
static inline CGFloat WK_SCREEN_WIDTH(){
    return [UIScreen mainScreen].bounds.size.width;
}
static inline CGFloat WK_SCREEN_HEIGHT(){
    return [UIScreen mainScreen].bounds.size.height;
}
static inline CGFloat WK_TabAndSafeBottomHeight(){
    return 49.F + (WK_IsIPhoneX() ? 34.F : 0.F);
}
static inline CGFloat WK_NaviBarHeight(){
    return 44.F;
}
static inline CGFloat WK_StatusBarHeight(){
    return WK_IsIPhoneX() ? 44.F : 20.F;
}
static inline CGFloat WK_StatusBarAndNaviBarHeight(){
    return WK_NaviBarHeight() + WK_StatusBarHeight();
}

NS_ASSUME_NONNULL_BEGIN

@interface SEGWebViewConsts : NSObject
@end

NS_ASSUME_NONNULL_END
